<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Class permissions</title>
<link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../index.html" title="Chapter 1. Boost.Log v2">
<link rel="up" href="../../utilities.html#header.boost.log.utility.permissions_hpp" title="Header &lt;boost/log/utility/permissions.hpp&gt;">
<link rel="prev" href="open_mode/open_or_create.html" title="Global open_or_create">
<link rel="next" href="abstract_ordering.html" title="Class template abstract_ordering">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="open_mode/open_or_create.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../utilities.html#header.boost.log.utility.permissions_hpp"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="abstract_ordering.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.log.permissions"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Class permissions</span></h2>
<p>boost::log::permissions — Access permissions wrapper. </p>
</div>
<h2 class="refsynopsisdiv-title">Synopsis</h2>
<div class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: &lt;<a class="link" href="../../utilities.html#header.boost.log.utility.permissions_hpp" title="Header &lt;boost/log/utility/permissions.hpp&gt;">boost/log/utility/permissions.hpp</a>&gt;

</span>
<span class="keyword">class</span> <a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span>
  <span class="comment">// types</span>
  <span class="keyword">typedef</span> <span class="identifier">implementation_defined</span> <a name="boost.log.permissions.native_type"></a><span class="identifier">native_type</span><span class="special">;</span>  <span class="comment">// The type of security permissions, specific to the operating system. </span>

  <span class="comment">// <a class="link" href="permissions.html#boost.log.permissionsconstruct-copy-destruct">construct/copy/destruct</a></span>
  <a class="link" href="permissions.html#idm38649-bb"><span class="identifier">permissions</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <a class="link" href="permissions.html#idm38655-bb"><span class="identifier">permissions</span></a><span class="special">(</span><a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <a class="link" href="permissions.html#idm38669-bb"><span class="identifier">permissions</span></a><span class="special">(</span><span class="identifier">native_type</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <a class="link" href="permissions.html#idm38674-bb"><span class="identifier">permissions</span></a><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">interprocess</span><span class="special">::</span><span class="identifier">permissions</span> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <a class="link" href="permissions.html#idm38679-bb"><span class="identifier">permissions</span></a><span class="special">(</span><a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> <a class="link" href="permissions.html#idm38661-bb"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="keyword">const</span> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> <a class="link" href="permissions.html#idm38685-bb"><span class="keyword">operator</span><span class="special">=</span></a><span class="special">(</span><a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="permissions.html#idm38613-bb">public member functions</a></span>
  <span class="keyword">void</span> <a class="link" href="permissions.html#idm38614-bb"><span class="identifier">set_native</span></a><span class="special">(</span><span class="identifier">native_type</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="identifier">native_type</span> <a class="link" href="permissions.html#idm38620-bb"><span class="identifier">get_native</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="permissions.html#idm38624-bb"><span class="identifier">set_default</span></a><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="permissions.html#idm38631-bb"><span class="identifier">set_unrestricted</span></a><span class="special">(</span><span class="special">)</span><span class="special">;</span>
  <span class="keyword">void</span> <a class="link" href="permissions.html#idm38638-bb"><span class="identifier">swap</span></a><span class="special">(</span><a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>

  <span class="comment">// <a class="link" href="permissions.html#idm38693-bb">friend functions</a></span>
  <span class="keyword">void</span> <a class="link" href="permissions.html#idm38694-bb"><span class="identifier">swap</span></a><span class="special">(</span><a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span><span class="special">,</span> <a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="idm89728"></a><h2>Description</h2>
<p>On Windows platforms, it represents a pointer to <code class="computeroutput">SECURITY_ATTRIBUTES</code>. The user is responsible for allocating and reclaiming resources associated with the pointer, <code class="computeroutput">permissions</code> instance does not own them.</p>
<p>On POSIX platforms, it represents a <code class="computeroutput">mode_t</code> value. </p>
<div class="refsect2">
<a name="idm89735"></a><h3>
<a name="boost.log.permissionsconstruct-copy-destruct"></a><code class="computeroutput">permissions</code> 
        public
       construct/copy/destruct</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><a name="idm38649-bb"></a><span class="identifier">permissions</span><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Default constructor. The method constructs an object that represents a null <code class="computeroutput">SECURITY_ATTRIBUTES</code> pointer on Windows platforms, and a <code class="computeroutput">mode_t</code> value <code class="computeroutput">0644</code> on POSIX platforms. </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="idm38655-bb"></a><span class="identifier">permissions</span><span class="special">(</span><a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="keyword">const</span> <span class="special">&amp;</span> that<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Copy constructor. </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="idm38669-bb"></a><span class="identifier">permissions</span><span class="special">(</span><span class="identifier">native_type</span> perms<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Initializing constructor. </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="idm38674-bb"></a><span class="identifier">permissions</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">interprocess</span><span class="special">::</span><span class="identifier">permissions</span> <span class="keyword">const</span> <span class="special">&amp;</span> perms<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Initializing constructor. </p>
</li>
<li class="listitem">
<pre class="literallayout"><a name="idm38679-bb"></a><span class="identifier">permissions</span><span class="special">(</span><a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;&amp;</span> that<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Move constructor. </p>
</li>
<li class="listitem">
<pre class="literallayout"><a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> <a name="idm38661-bb"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="keyword">const</span> <span class="special">&amp;</span> that<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Copy assignment. </p>
</li>
<li class="listitem">
<pre class="literallayout"><a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> <a name="idm38685-bb"></a><span class="keyword">operator</span><span class="special">=</span><span class="special">(</span><a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;&amp;</span> that<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Move assignment. </p>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="idm89837"></a><h3>
<a name="idm38613-bb"></a><code class="computeroutput">permissions</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="idm38614-bb"></a><span class="identifier">set_native</span><span class="special">(</span><span class="identifier">native_type</span> perms<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Sets permissions from the OS-specific permissions. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="identifier">native_type</span> <a name="idm38620-bb"></a><span class="identifier">get_native</span><span class="special">(</span><span class="special">)</span> <span class="keyword">const</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Returns the underlying OS-specific permissions. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="idm38624-bb"></a><span class="identifier">set_default</span><span class="special">(</span><span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>Sets the default permissions, which are equivalent to <code class="computeroutput">NULL</code> <code class="computeroutput">SECURITY_ATTRIBUTES</code> on Windows and <code class="computeroutput">0644</code> on POSIX platforms. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="idm38631-bb"></a><span class="identifier">set_unrestricted</span><span class="special">(</span><span class="special">)</span><span class="special">;</span></pre>
<p>Sets unrestricted permissions, which are equivalent to <code class="computeroutput">SECURITY_ATTRIBUTES</code> with <code class="computeroutput">NULL</code> DACL on Windows and <code class="computeroutput">0666</code> on POSIX platforms. </p>
</li>
<li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="idm38638-bb"></a><span class="identifier">swap</span><span class="special">(</span><a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> that<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>
<p>The method swaps the object with <span class="emphasis"><em>that</em></span>.</p>
<p>
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><code class="computeroutput">that</code></span></p></td>
<td><p>The other object to swap with. </p></td>
</tr></tbody>
</table></div></td>
</tr></tbody>
</table></div>
</li>
</ol></div>
</div>
<div class="refsect2">
<a name="idm89918"></a><h3>
<a name="idm38693-bb"></a><code class="computeroutput">permissions</code> friend functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
<pre class="literallayout"><span class="keyword">void</span> <a name="idm38694-bb"></a><span class="identifier">swap</span><span class="special">(</span><a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> a<span class="special">,</span> <a class="link" href="permissions.html" title="Class permissions">permissions</a> <span class="special">&amp;</span> b<span class="special">)</span> <span class="keyword">noexcept</span><span class="special">;</span></pre>Swaps the two <code class="computeroutput">permissions</code> objects. </li></ol></div>
</div>
</div>
</div>
<div class="copyright-footer">Copyright © 2007-2024 Andrey Semashev<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>).
      </p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="open_mode/open_or_create.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../utilities.html#header.boost.log.utility.permissions_hpp"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="abstract_ordering.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
